Handle the row reference path being NULL. (#410565, Joe Markus Clarke,
authorMatthias Clasen <mclasen@redhat.com>
Mon, 12 Mar 2007 04:09:25 +0000 (04:09 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 12 Mar 2007 04:09:25 +0000 (04:09 +0000)
2007-03-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserbutton.c (change_icon_theme_get_info_cb):
        Handle the row reference path being NULL.  (#410565, Joe Markus
        Clarke, patch by Chris Wilson)

svn path=/trunk/; revision=17487

ChangeLog
gtk/gtkfilechooserbutton.c

index 74d7989e74abd4d9d68af48be06f4af68569f093..2089ee2b40797589dfb16c50ac4cca88452368eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-12  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkfilechooserbutton.c (change_icon_theme_get_info_cb):
+       Handle the row reference path being NULL.  (#410565, Joe Markus
+       Clarke, patch by Chris Wilson)
+
 2007-03-11  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/testiconview.c: Handle Menu key presses without
index e5c23d613ee311c18c83da3e03e2296d86b2b842..dfeba8d83ca5c5022fe916b6ed236349c18bb784 100644 (file)
@@ -1246,17 +1246,20 @@ change_icon_theme_get_info_cb (GtkFileSystemHandle *handle,
       width = MAX (width, gdk_pixbuf_get_width (pixbuf));
 
       path = gtk_tree_row_reference_get_path (data->row_ref);
-      gtk_tree_model_get_iter (data->button->priv->model, &iter, path);
-      gtk_tree_path_free (path);
+      if (path) 
+        {
+          gtk_tree_model_get_iter (data->button->priv->model, &iter, path);
+          gtk_tree_path_free (path);
 
-      gtk_list_store_set (GTK_LIST_STORE (data->button->priv->model), &iter,
-                         ICON_COLUMN, pixbuf,
-                         -1);
-      g_object_unref (pixbuf);
+          gtk_list_store_set (GTK_LIST_STORE (data->button->priv->model), &iter,
+                             ICON_COLUMN, pixbuf,
+                             -1);
 
-      g_object_set (data->button->priv->icon_cell,
-                   "width", width,
-                   NULL);
+          g_object_set (data->button->priv->icon_cell,
+                       "width", width,
+                       NULL);
+        }
+      g_object_unref (pixbuf);
     }
 
 out: